e02daf
e02daf
© Numerical Algorithms Group, 2002.
Purpose
E02DAF Least-squares surface fit, bicubic splines
Synopsis
[lamda,mu,dl,c,sigma,rank,ifail] = e02daf(x,y,f,lamda,mu,point<,w,nc,epslon,...
ifail>)
Description
This routine determines a bicubic spline fit s(x,y) to the set of
data points (x ,y ,f ) with weights w , for r=1,2,...,m. The two
r r r r
sets of internal knots of the spline, {(lambda)} and {(mu)},
associated with the variables x and y respectively, are
prescribed by the user. These knots can be thought of as dividing
the data region of the (x,y) plane into panels. A bicubic spline
consists of a separate bicubic polynomial in each panel, the
polynomials joining together with continuity up to the second
derivative across the panel boundaries.
s(x,y) has the property that (Sigma), the sum of squares of its
weighted residuals (rho) , for r=1,2,...,m, where
r
(rho) =w (s(x ,y )-f ), (1)
r r r r r
is as small as possible for a bicubic spline with the given knot
sets. The routine produces this minimized value of (Sigma) and
the coefficients c in the B-spline representation of s(x,y).
ij
E02DEF and E02DFF are available to compute values of the fitted
spline from the coefficients c .
ij
The least-squares criterion is not always sufficient to determine
the bicubic spline uniquely: there may be a whole family of
splines which have the same minimum sum of squares. In these
cases, the routine selects from this family the spline for which
the sum of squares of the coefficients c is smallest: in other
ij
words, the minimal least-squares solution. This choice, although
arbitrary, reduces the risk of unwanted fluctuations in the
spline fit.
Parameters
e02daf
Required Input Arguments:
x (:) real
y (:) real
f (:) real
lamda (:) real
mu (:) real
point (:) integer
Optional Input Arguments: <Default>
w (:) real ones(length(x),1)
nc integer (length(lamda)-...
... 4)*(length(mu)-4)
epslon real eps
ifail integer -1
Output Arguments:
lamda (:) real
mu (:) real
dl (nc) real
c (nc) real
sigma real
rank integer
ifail integer